scoreboard objectives add System dummy
scoreboard objectives add animSys dummy
scoreboard objectives add Charge_longbow_using dummy
scoreboard objectives add Charge_longbow_FinalDamage dummy
scoreboard objectives add mapSys dummy
scoreboard objectives add ReloadCount dummy
scoreboard players add Reload ReloadCount 1

function dab:system/map/map_init

execute store result score gameTime mapSys run random value 0..8

execute unless score SP_DrawCount System matches -2147483648..2147483647 run scoreboard players set SP_DrawCount System 0
execute store result storage dab:loot SP_DrawCount int 1 run scoreboard players get SP_DrawCount System

execute unless data storage dab:loot SP_Poor run data modify storage dab:loot SP_Poor set value [{},{},{},{},{},{},{},{},{}]
execute unless data storage dab:loot SP_Poor[0].Target run data modify storage dab:loot SP_Poor[0] set value {Target:5000}
execute unless entity @e[tag=SP,type=text_display] run summon text_display 23 4.8 8.5 {Tags:["GUI","SP"],billboard:"center",text:'[]'}
execute unless entity @e[tag=SP2,type=text_display] run summon text_display 23 4.5 8.5 {Tags:["GUI","SP2"],billboard:"center",text:'[]'}
execute unless entity @e[tag=SP3,type=text_display] run summon text_display 23 4.2 8.5 {Tags:["GUI","SP3"],billboard:"center",text:'[]'}
execute unless entity @e[tag=IA,tag=SP,type=interaction] run summon minecraft:interaction 23 3 8 {Tags:["IA","SP"],width:1.2,response:1b}
execute unless entity @e[tag=SP_N,type=villager] run summon minecraft:villager 25.56 2.00 8.27 {NoGravity: 1b,Invulnerable: 1b,Tags: ["SP_N", "GUI"],Motion:[0.0d, 0.0d, 0.0d],Health:20.0f,Silent:1b,NoAI:1b,Rotation:[179.28174f, 0.0f]}
#GUI SP SP2 SP3

scoreboard objectives add Number dummy
scoreboard players set 1 Number 1
scoreboard players set 2 Number 2
scoreboard players set 3 Number 3
scoreboard players set 20 Number 20

scoreboard objectives add PlayerHasBow dummy

tellraw @a [{"text":"这已经是这个数据包第","color":"green","bold": true},{"score": {"name": "Reload","objective": "ReloadCount"},"color":"yellow","bold": true},{"text": "次Reload啦！","color":"green","bold": true}]

#用于存放临时分数
scoreboard objectives add temp dummy